/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Sik
 */
@Embeddable
public class DisponibilitePK implements Serializable
{
    @Basic(optional = false)
    @Column(name = "idCompetition")
    private int idCompetition;
    @Basic(optional = false)
    @Column(name = "idAdherent")
    private int idAdherent;

    public DisponibilitePK()
    {
    }

    public DisponibilitePK(int idCompetition, int idAdherent)
    {
        this.idCompetition = idCompetition;
        this.idAdherent = idAdherent;
    }

    public int getIdCompetition()
    {
        return idCompetition;
    }

    public void setIdCompetition(int idCompetition)
    {
        this.idCompetition = idCompetition;
    }

    public int getIdAdherent()
    {
        return idAdherent;
    }

    public void setIdAdherent(int idAdherent)
    {
        this.idAdherent = idAdherent;
    }

    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += (int) idCompetition;
        hash += (int) idAdherent;
        return hash;
    }

    @Override
    public boolean equals(Object object)
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DisponibilitePK))
        {
            return false;
        }
        DisponibilitePK other = (DisponibilitePK) object;
        if (this.idCompetition != other.idCompetition)
        {
            return false;
        }
        if (this.idAdherent != other.idAdherent)
        {
            return false;
        }
        return true;
    }

    @Override
    public String toString()
    {
        return "Model.DisponibilitePK[ idCompetition=" + idCompetition + ", idAdherent=" + idAdherent + " ]";
    }
    
}
